<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
</head>
<body>
    <h1 id="app" v-show="flag">
        {{msg}}
    </h1>
</body>

<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data: {
            msg: "显示与隐藏数据",
            flag: true
        }
    });
</script>
</html>